#include "view_time_12.h"
#include "view_time_8.h"
#include "view_time_12.inc"
#include "view_time_0.h"
#include "display_ctrl.h"
#include "platform_assert.h"
#include "lfs_file_manager_auto.h"
#include "rtc.h"
#include "datetime.h"
#include "blecom.h"
#include "battery_ctrl.h"
#include "sport_his.h"
#include "display_ctrl.h"
#include "display_interface_240x240.h"
#include "datetime.h"
#include "heart_rate_interface.h"
#include "font/num_font.h"
#include "font_mngr.h"
#include "view_common.h"
#include "app_trace.h"
#include "view_times.h"
#include "math.h"
#include "weather_ctrl.h"
#ifdef TIME_12_SKIP
#else
void view_time_12_display(void)
{
    int x = 0;
    int y = 0;
    _disp_show_flash_img(DISP_LFS_FILE_INDEX_0, x, y, FILE_IMG_bp_wj_qt_25);
    show_time_0_battery(disp_ctrl.com_data.i_temp[7], disp_ctrl.com_data.i_temp[8]);
    show_time_0_ble();
    disp_draw_user_image_num_with_digits_filter_color(3, 53, disp_ctrl.com_data.i_temp[3], 2, 49, num_60x56_TAB);
    disp_draw_user_image_num_with_digits_filter_color(125, 53, disp_ctrl.com_data.i_temp[4], 2, 49, num_60x56_TAB);
    x = 32;
    y = 219;
    const unsigned char *const *image_tab = num_10x16_TAB;
    int const font_width = image_tab[0][0] + (image_tab[0][1] << 8);
    int const font_height = image_tab[0][2] + (image_tab[0][3] << 8);
    int const interval = 1;
    if (disp_ctrl.com_data.i_temp[17] < 40 || disp_ctrl.com_data.i_temp[17] > 220)
    {
        // if (is_center_align)
        // {
        //     x += 26;
        // }
        disp_draw_rect_color(x, y + font_height / 2 - 2, x + font_width - 1, y + font_height / 2, RGB565_COLOR_WHITE);
        x += font_width + interval;
        disp_draw_rect_color(x, y + font_height / 2 - 2, x + font_width - 1, y + font_height / 2, RGB565_COLOR_WHITE);
    }
    else
    {
        disp_draw_user_image_num_filter_color(x, y, disp_ctrl.com_data.i_temp[17], font_width + interval, image_tab);
    }
#ifdef TIME_NO_WRIST_TEMPERATURE
    view_time_show_temperature_float_with_font(34, 189, disp_ctrl.com_data.f_temp[26], disp_ctrl.com_data.i_temp[21] == WEATHER_TEMPERATURE_TYPE_C, false, num_10x16_TAB, 1, 1, 7);
#else
    view_time_show_temperature_float_with_font(34, 189, disp_ctrl.com_data.f_temp[25], disp_ctrl.com_data.i_temp[21] == WEATHER_TEMPERATURE_TYPE_C, false, num_10x16_TAB, 1, 1, 7);
    view_time_show_temperature_float_with_font(34, 156, disp_ctrl.com_data.f_temp[26], disp_ctrl.com_data.i_temp[21] == WEATHER_TEMPERATURE_TYPE_C, false, num_10x16_TAB, 1, 1, 7);
#endif
}
#endif
